import request from '../utils/request';

//获取验证码
export const getCode = (data) =>{
  return request.post('/get/code', data);
}

//注册
export const register = (data) =>{
  return request.post('/user/authentication', data);
}

//登录
export const login = (data) =>{
  return request.post('/login', data);
}

//权限管理列表
export const authAdmin = (params) =>{
  return request.get('/auth/admin', { params });
}

//权限管理列表
export const userGetMenu = (params) =>{
  return request.get('/user/getmenu', { params });
}

//菜单权限修改
export const userSetMenu = (data) =>{
  return request.post('/user/setmenu', data);
}

//菜单权限列表
export const menuList = (params) =>{
  return request.get('/menu/list', { params });
}

//权限下拉列表
export const menuSelectList = (params) =>{
  return request.get('/menu/selectlist', { params });
}

//用户数据修改
export const userUpdate = (data) =>{
  return request.post('/update/user', data);
}

//用户菜单权限
export const menuPermission = (params) =>{
  return request.get('/menu/permissions', { params });
}

//陪护师头像
export const photoList = (params) =>{
  return request.get('/photo/list', { params });
}

//创建陪护师
export const companion = (data) =>{
  return request.post('/companion', data);
}

//获取陪护师列表
export const companionList = (params) =>{
  return request.get('/companion/list', { params });
}

//删除陪护师
export const companionDelete = (data) =>{
  return request.post('/delete/companion',  data );
}

//获取订单列表
export const orderList = (params) =>{ 
  return request.get('/admin/order', { params });
}